package com.ttdevs.spring.controller;


import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by ttdevs on 15/7/23.
 */
public class WelcomeController implements Controller {


    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String result = "Hello world";

        System.out.println(this.getClass().getSimpleName() + "------------" + result + "--------------");

        return new ModelAndView("welcome", "result", result);
    }
}
